package com.gem.day6;

public class Person {
	String name;
	int age;
	double money;
	public Person(String name, int age, double money) {
		super();
		this.name = name;
		this.age = age;
		this.money = money;
	}
	@Override
	public boolean equals(Object obj) {
		if(this==obj){
			return true;
		}else {
			if(obj instanceof Person){
				Person p=(Person) obj;
				if((p.name==this.name) && (p.age==this.age) && (p.money==this.money)){
					return true;
				}else{
					return false;
				}
			}else {
				return false;
			}
		}
	}
	
}
